import express from 'express';
import UserVisitController from '../controllers/userVisit.controller.js';

const router = express.Router();

/**
 * 用户访问相关路由
 */
router.get('/user/:userId/component/:componentId', UserVisitController.getUserVisitByUserIdAndComponentId);
router.post('/', UserVisitController.recordUserVisit);
router.put('/user/:userId/component/:componentId/reset', UserVisitController.resetUserVisitCount);
router.delete('/user/:userId/component/:componentId', UserVisitController.deleteUserVisit);

export default router;
